package com.iqunxing.redis.redisInAction.ch08.po;

import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;

public class User {

    private Long id;

    private String loginName;

    private String name;

    private Integer followers;

    private Integer following;

    private Integer posts;

    private Date singup;

    public User() {
    }

    public User(Long id, String loginName, String name) {
        this.id = id;
        this.loginName = loginName;
        this.name = name;
        this.followers = 0;
        this.following = 0;
        this.posts = 0;
        this.singup = new Date();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getFollowers() {
        return followers;
    }

    public void setFollowers(Integer followers) {
        this.followers = followers;
    }

    public Integer getFollowing() {
        return following;
    }

    public void setFollowing(Integer following) {
        this.following = following;
    }

    public Integer getPosts() {
        return posts;
    }

    public void setPosts(Integer posts) {
        this.posts = posts;
    }

    public Date getSingup() {
        return singup;
    }

    public void setSingup(Date singup) {
        this.singup = singup;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
